﻿using System.Collections.Generic;
using Internal.Runtime.Models;

namespace Runtime.Models {

    public interface IDFR_BattleSkillModelTD : IDFR_BattleSkillModelBase {

        new IDFR_BattleSkillModelTDSetter AsSetter();

        /// <summary>
        /// 效果数据列表
        /// </summary>
        new IDFR_ReadOnlyBattleEffectListModelTD EffectList { get; }

        /// <summary>
        /// 参数列表
        /// </summary>
        IReadOnlyList<float> ParameterList { get; }
    }

    public interface IDFR_BattleSkillModelTDSetter : IDFR_BattleSkillModelBaseSetter, IDFR_BattleSkillModelTD {
    }

    public abstract class DFR_BattleSkillModelTD : DFR_BattleSkillModelBase, IDFR_BattleSkillModelTD, IDFR_BattleSkillModelTDSetter, IDFR_BattleSkillModelTDInternal {

        public override int RequireAttackLaunchTimes => (int)ParameterList[0];

        public override int RequireKillCount => (int)ParameterList[0];

        public new IDFR_BattleSkillModelTDSetter AsSetter() => this;

        public IReadOnlyList<float> ParameterList { get; protected set; }

        public new IDFR_ReadOnlyBattleEffectListModelTD EffectList => (IDFR_ReadOnlyBattleEffectListModelTD)base.EffectList;

        protected override void Dispose() {
            ParameterList = null;
            base.Dispose();
        }

        protected override bool Initialize() {
            return true;
        }
    }
}

namespace Internal.Runtime.Models {

    public interface IDFR_BattleSkillModelTDInternal : IDFR_BattleSkillModelBaseInternal {
    }
}